package UIFree.FX.pageturner
{
	import UIFree.uif_ecomponent;
	
	import flash.geom.Point;
	
	public class pt_circleTurner extends pt_maskTurner
	{
		public function pt_circleTurner(parent:uif_ecomponent, a_transition:Function=null, a_fps:Number=20, a_duration:Number=1500)
		{
			super(parent, a_transition, a_fps, a_duration);
		}
		
		override protected function updateFromState(): void {
			super.updateFromState();
			startBitmap.alpha = 1 - state;
			endBitmap.alpha = state;
		}
		
		override protected function paintMask():void {
			var p: Point = new Point(endBitmap.width / 2, endBitmap.height / 2);
			slideMask.graphics.clear();
			slideMask.graphics.beginFill(0xFFFFFF);
			slideMask.graphics.drawCircle(p.x, p.y, p.length * state);
		}		
	}
}